package com.meixun.xuanke.course.task;

import com.meixun.xuanke.course.service.CourseService;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class CourseTask {
    private org.slf4j.Logger logger = LoggerFactory.getLogger(this.getClass());

    @Resource
    CourseService courseService;

    @Scheduled(cron = "0 0/5 * * * *")
    public void updateCoureseList(){

        courseService.updateCoureseList();

    }
}
